package logic
{
	import assets.Globals;
	
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class Score
	{
		private static var enemiesKilled:Number = 0;
		private static var enemiesEscaped:Number = 0;
		private static var towersDestroyed:Number = 0;
		private static var headerText:TextField = new TextField();
		
		private static var style:TextFormat = new TextFormat();
		
		public static function getEnemiesKilled():Number
		{
			return enemiesKilled;
		}
		
		public static function getEnemiesEscaped():Number
		{
			return enemiesEscaped;
		}
		
		public static function incEnemiesiKilled():void
		{
			enemiesKilled ++;
			createHeaderScore();
		}
		
		public static function incEnemiesEscaped():void
		{
			enemiesEscaped ++;
			createHeaderScore();
		}
		
		public static function incTowersDestroyed():void
		{
			towersDestroyed ++;
			createHeaderScore();
		}
		
		public static function createHeaderScore():TextField
		{
			headerText.text = 
				"Enemies killed: " + String(enemiesKilled)
/*				+ "\n" +
				"Enemies escaped: " + String(enemiesEscaped)
*/				+ "\n" +
				"Moral: " + String(Money.getMoney());
			
			headerText.autoSize = TextFieldAutoSize.LEFT;
			
			style.size = 20;
			style.bold = true;
			style.font = "Colibri";
			style.color = 0xCCCCCC;
			
			headerText.y = Globals.SCREEN_HEIGHT + 5;
			headerText.setTextFormat(style);
			
			
			headerText.selectable = false;
			
			return headerText;
		}
		
		
		public static function getHeaderScore():void
		{
			
		}
	}
}












